﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;

namespace SharpMap.Wpf
{
    /// <summary>
    /// This class provides attached properties used on item presented on a map,
    /// usually within MapLayer
    /// </summary>
    public static class MapItemProperties
    {


        public static GeoAPI.Coordinates.ICoordinate GetCoordinates(DependencyObject obj)
        {
            return (GeoAPI.Coordinates.ICoordinate)obj.GetValue(CoordinatesProperty);
        }

        public static void SetCoordinates(DependencyObject obj, GeoAPI.Coordinates.ICoordinate value)
        {
            obj.SetValue(CoordinatesProperty, value);
        }

        // Using a DependencyProperty as the backing store for Coordinates.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty CoordinatesProperty =
            DependencyProperty.RegisterAttached("Coordinates", typeof(GeoAPI.Coordinates.ICoordinate), typeof(MapItemProperties), 
            new UIPropertyMetadata(default(GeoAPI.Coordinates.ICoordinate)));


        static GeoAPI.Coordinates.ICoordinate Coordinates { get; set; }
    }
}
